package edu.jd.movieplatform.security.m_login.impl;

import edu.jd.movieplatform.security.login.LoginDto;
import edu.jd.movieplatform.security.login.dao.LoginDao;
import edu.jd.movieplatform.security.m_login.MLoginDto;
import edu.jd.movieplatform.security.m_login.MLoginService;
import edu.jd.movieplatform.security.m_login.dao.MLoginDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional
public class MLoginServiceImpl implements MLoginService {

    @Resource
    private MLoginDao mLoginDao;

    @Override
    public boolean checkMLogin(MLoginDto dto) {
            int cnt = mLoginDao.findCountByManNameAndPwd(dto);
            return cnt>0;
    }
}
